<?php
class ControllerPaymentCheque extends Controller {
	protected function index() {
		$this->language->load('payment/cheque');

		$this->render('payment/cheque.tpl');
	}

	public function confirm() {
		$this->language->load('payment/cheque');

		M('checkout/order');

		$comment  = $this->_['text_payable'] . "\n";
		$comment .= C('cheque_payable') . "\n\n";
		$comment .= $this->_['text_address'] . "\n";
		$comment .= C('config_address') . "\n\n";
		$comment .= $this->_['text_payment'] . "\n";

		$this->model_checkout_order->confirm($this->session->data['order_id'], C('cheque_order_status_id'), $comment, true);
	}
}
?>